/*
 * 易族智汇（北京）科技有限公司 版权所有。
 * 未经许可，您不得使用此文件。
 * 官方地址：www.javamall.com.cn
 */
package com.enation.app.javashop.core.client.feignimpl.statistics;

import com.enation.app.javashop.client.statistics.GoodsDataClient;
import com.enation.app.javashop.core.client.fallback.statistics.GoodsDataClientFallbackFactory;
import com.enation.app.javashop.core.client.fallback.system.ValidatorClientFallbackFactory;
import com.enation.app.javashop.core.handler.FeignConfiguration;
import com.enation.app.javashop.model.statistics.dto.GoodsData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 商品收集manager
 *
 * @author chopper
 * @version v1.0
 * @Description:
 * @since v7.0
 * 2018/5/8 下午4:11
 */

@FeignClient(name = "statistics-service",fallbackFactory = GoodsDataClientFallbackFactory.class,configuration = {FeignConfiguration.class})
public interface GoodsDataClientFeignImpl extends GoodsDataClient {
    /**
     * 新增商品
     *
     * @param goodsIds 商品id
     */
    @Override
    @RequestMapping(value = "/client/statistics/goods/add", method = RequestMethod.POST)
    void addGoods(@RequestParam("goods_ids") Long[] goodsIds);

    /**
     * 修改商品
     *
     * @param goodsIds 商品id
     */
    @Override
    @RequestMapping(value = "/client/statistics/goods/update", method = RequestMethod.POST)
    void updateGoods(@RequestParam("goods_ids") Long[] goodsIds);

    /**
     * 删除商品
     *
     * @param goodsIds 商品id
     */
    @Override
    @RequestMapping(value = "/client/statistics/goods/del", method = RequestMethod.POST)
    void deleteGoods(@RequestParam("goods_ids") Long[] goodsIds);

    /**
     * 修改商品收藏数量
     *
     * @param goodsData
     */
    @Override
    @RequestMapping(value = "/client/statistics/collection/goods", method = RequestMethod.POST)
    void updateCollection(@RequestBody GoodsData goodsData);

    /**
     * 下架所有商品
     * @param sellerId
     */
    @Override
    @RequestMapping(value = "/client/statistics/goods/under", method = RequestMethod.POST)
    void underAllGoods(@RequestParam("seller_id")Long sellerId);


}
